<template>
  <el-form :model="form" label-width="120px">
 
                    <JmInput jmname="名称" v-model="form.name"></JmInput>
                    <JmInput jmname="标识" v-model="form.mark"></JmInput>
 	
                    <JmEnum jmname="广告位类型" v-model="form.type" :jv="{1: '图片广告', 2: '多图&幻灯广告', 3: '代码广告'}" jtype="3"  ></JmEnum>
 		
                    <JmInput type="num"  jmname="广告宽度" v-model="form.width"></JmInput>
	
                    <JmInput  type="num"  jmname="广告高度" v-model="form.height"></JmInput>
 			               <JmInput type="textarea" jmname="代码" v-model="form.code" remark="当广告位类型是3代码广告的时候使用"></JmInput>
                    <el-form-item>
                      <el-button type="primary" @click="onSubmit">Create</el-button>
                  
                    </el-form-item>
 
  </el-form>
</template>
 
<script>
import JmInput from "../../../components/form/JmInput.vue";
import JmEnum from "../../../components/form/JmEnum.vue";
export default {
  components: { JmInput, JmEnum },
  data() {
    return {
         form: {
                name: '1',
                mark: "1",
                type: 1,
                width: '',
                height:"",
                code:'',
            }, 
    };
  }, 
  methods: {
    onSubmit() { 
      const res = this.$api.addAdszone(this.form); 
       this.$parent.$parent.$parent.$parent.handleClose();   
      console.log(res);
    },
  },
};
</script>
<style>
.demo-tabs > .el-tabs__content {
  padding: 32px;
  color: #6b778c;
  font-size: 32px;
  font-weight: 600;
}
.demo-tabs .custom-tabs-label .el-icon {
  vertical-align: middle;
}
.demo-tabs .custom-tabs-label span {
  vertical-align: middle;
  margin-left: 4px;
}
</style>